﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace ZX.WebApp.Crm.BasePages
{
    public partial class WorkflowMapDialog : System.Web.UI.Page
    {
        ZX.WebApp.CrmWorkFlowService.WorkFlowServiceClient client = new ZX.WebApp.CrmWorkFlowService.WorkFlowServiceClient();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BaseUserPage.LoadWaitPage();
              
            }
            if (Request["workflowID"] != null && Request["workflowInsID"] != null)
            {
                string workflowId = string.Empty;
                string workflowInsId = string.Empty;
                workflowId = Request.QueryString["workflowID"];
                workflowInsId = Request.QueryString["workflowInsID"];
                string sb1 = "WfMonitorPic.aspx?WorkFlowId=" + workflowId + "&WorkFlowInstanceId=" + workflowInsId;
                Image1.ImageUrl = sb1;
                Image1.DataBind();
                Init(workflowInsId);


            }
        }
        public void Init(string workflowInsId)
        {
            DataTable dt = client.GetWorkflowdetail(workflowInsId);
            gvworkflowMessage.DataSource = dt;
            gvworkflowMessage.DataBind();
        }
      
    }
}